package com.etc.service.impl;

import com.etc.dao.HouseholdDao;
import com.etc.entity.Household;
import com.etc.entity.Owner;
import com.etc.entity.Room;
import com.etc.service.HouseholdService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class HouseholdServiceImpl implements HouseholdService {

    @Resource
    private HouseholdDao householdDao;
    @Override
    public int insert(Household household) {
        return householdDao.insert(household);
    }

    @Override
    public Household findHouseholdById(Integer id) {
        return householdDao.findHouseholdById(id);
    }

    @Override
    public Owner findOwnerByRoom(Integer id) {
        return householdDao.findOwnerByRoom(id);
    }

    @Override
    public Room findRoomById(Integer id) {
        return householdDao.findRoomById(id);
    }


}
